package com.crl.animation.pak
{
	public class PakDef
	{
		/**
		 * pak大小; 
		 */		
		public var w:int;
		public var h:int;
		
		/**
		 * 是否为模型; 
		 */		
		public var isM:Boolean=false;
		
		/**
		 * pak里面所含的数据; 
		 */		
		public var actions:Vector.<ActionDef>;
		
		public function PakDef()
		{
		}
		
		/**
		 * 取得指定动作的第一帧渲染定义; 
		 * @param action
		 * @return 
		 * 
		 */		
		public function getFristRender(action:int):RenderDef{
			if(isM){
				var def:ActionMDef=actions[action] as ActionMDef;
				if(def)return def.renders[0];
			}
			return null;
		}
		
		public function getFrame(dirction:int,action:int,frame:int):FrameDef{
			return actions[action].dirctions[dirction].frames[frame];
		}
	}
}